#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <aclconio.h>
#include <define.h>
#include <transact.h>
#include <tran.h>
#include <gds.h>
#include <sizes.h>
#include "ConfProto.h"
#include "tblutil.h"
#include <\SOFTPAY\Ver30\source\include\sizes.h>
#include <\SOFTPAY\Ver30\HostSrc\citisrc\citiids.h>
#include <\SOFTPAY\Ver30\HostSrc\cpacsrc\cpacids.h>
#include <confio.h>

#include <\SOFTPAY\Ver30\source\include\TCT.h>

const char*TCTName = "TCT.dat";

static TCT_REC srTCTRec;

static int recordNum;
int	inLoadTCTRec (int inRecNumber)
{
	int inRet;

	inRet = inLoadConfRec(TCT_FILENAME, SIZE_TCT_REC, inRecNumber, (char *) &srTCTRec);

	recordNum = inRecNumber;
	return inRet;
}

void *pvdGetTCTRec(void)
{
	return &srTCTRec;

}

int	inSaveTCTRec (int inRecNumber)
{
	int inRet;

	inRet = inSaveConfRec(TCT_FILENAME, SIZE_TCT_REC, inRecNumber, (char *) &srTCTRec);

	return inRet;
}

int	inGetTCTRecNumber (void)
{
	return recordNum;
}

int	inUpdateTCTRec (void)
{
	int inRet;

	inRet = inSaveConfRec(TCT_FILENAME, SIZE_TCT_REC, recordNum, (char *) &srTCTRec);

	return inRet;
}

void	vdResetTCTRec (void)
{
	memset((void*)&srTCTRec, 0, REC_SIZEOF(srTCTRec));
}

char* szGetSuperPwd(void)
{
	return srTCTRec.szSuperPwd;
}

void vdSetSuperPwd(const char* szSuperPwd)
{
	strNumCopy(srTCTRec.szSuperPwd, szSuperPwd, sizeof(((TCT_REC*)NULL)->szSuperPwd)-1);
}

char* szGetIdleLogoName(void)
{
	return srTCTRec.szIdleLogoName;
}

void vdSetIdleLogoName(const char* szIdleLogoName)
{
	strNumCopy(srTCTRec.szIdleLogoName, szIdleLogoName, sizeof(((TCT_REC*)NULL)->szIdleLogoName)-1);
}

char* szGetTracks(void)
{
	return srTCTRec.szTracks;
}

void vdSetTracks(const char* szTracks)
{
	strNumCopy(srTCTRec.szTracks, szTracks, sizeof(((TCT_REC*)NULL)->szTracks)-1);
}

char* szGetManagerPwd(void)
{
	return srTCTRec.szManagerPwd;
}

void vdSetManagerPwd(const char* szManagerPwd)
{
	strNumCopy(srTCTRec.szManagerPwd, szManagerPwd, sizeof(((TCT_REC*)NULL)->szManagerPwd)-1);
}

char* szGetDateFormat(void)
{
	return srTCTRec.szDateFormat;
}

void vdSetDateFormat(const char* szDateFormat)
{
	strNumCopy(srTCTRec.szDateFormat, szDateFormat, sizeof(((TCT_REC*)NULL)->szDateFormat)-1);
}

char* szGetPABXCode(void)
{
	return srTCTRec.szPABXCode;
}

void vdSetPABXCode(const char* szPABXCode)
{
	strNumCopy(srTCTRec.szPABXCode, szPABXCode, sizeof(((TCT_REC*)NULL)->szPABXCode)-1);
}

char* szGetForceOnLineTime(void)
{
	return srTCTRec.szForceOnLineTime;
}

void vdSetForceOnLineTime(const char* szForceOnLineTime)
{
	strNumCopy(srTCTRec.szForceOnLineTime, szForceOnLineTime, sizeof(((TCT_REC*)NULL)->szForceOnLineTime)-1);
}

char* szGetFallBackTime(void)
{
	return srTCTRec.szFallBackTime;
}

void vdSetFallBackTime(const char* szFallBackTime)
{
	strNumCopy(srTCTRec.szFallBackTime, szFallBackTime, sizeof(((TCT_REC*)NULL)->szFallBackTime)-1);
}

char* szGetTCTStrDummy(void)
{
	return srTCTRec.szTCTStrDummy;
}

void vdSetTCTStrDummy(const char* szTCTStrDummy)
{
	strNumCopy(srTCTRec.szTCTStrDummy, szTCTStrDummy, sizeof(((TCT_REC*)NULL)->szTCTStrDummy)-1);
}

char chGetCurrentShift(void)
{
	return srTCTRec.chCurrentShift;
}

void vdSetCurrentShift(char chCurrentShift)
{
	srTCTRec.chCurrentShift = chCurrentShift;
}

short inGetPinBarBaudRate(void)
{
	return srTCTRec.inPinBarBaudRate;
}

void vdSetPinBarBaudRate(short inPinBarBaudRate)
{
	srTCTRec.inPinBarBaudRate = inPinBarBaudRate;
}

short inGetPinBarDataFormat(void)
{
	return srTCTRec.inPinBarDataFormat;
}

void vdSetPinBarDataFormat(short inPinBarDataFormat)
{
	srTCTRec.inPinBarDataFormat = inPinBarDataFormat;
}

short inGetTipPercent(void)
{
	return srTCTRec.inTipPercent;
}

void vdSetTipPercent(short inTipPercent)
{
	srTCTRec.inTipPercent = inTipPercent;
}

short inGetTipProcessing(void)
{
	return srTCTRec.inTipProcessing;
}

void vdSetTipProcessing(short inTipProcessing)
{
	srTCTRec.inTipProcessing = inTipProcessing;
}

short inGetExcessTip(void)
{
	return srTCTRec.inExcessTip;
}

void vdSetExcessTip(short inExcessTip)
{
	srTCTRec.inExcessTip = inExcessTip;
}

short inGetSugTipPer1(void)
{
	return srTCTRec.inSugTipPer1;
}

void vdSetSugTipPer1(short inSugTipPer1)
{
	srTCTRec.inSugTipPer1 = inSugTipPer1;
}

short inGetSugTipPer2(void)
{
	return srTCTRec.inSugTipPer2;
}

void vdSetSugTipPer2(short inSugTipPer2)
{
	srTCTRec.inSugTipPer2 = inSugTipPer2;
}

short inGetSugTipPer3(void)
{
	return srTCTRec.inSugTipPer3;
}

void vdSetSugTipPer3(short inSugTipPer3)
{
	srTCTRec.inSugTipPer3 = inSugTipPer3;
}

short inGetPPTimeOut(void)
{
	return srTCTRec.inPPTimeOut;
}

void vdSetPPTimeOut(short inPPTimeOut)
{
	srTCTRec.inPPTimeOut = inPPTimeOut;
}

short inGetClerkMode(void)
{
	return srTCTRec.inClerkMode;
}

void vdSetClerkMode(short inClerkMode)
{
	srTCTRec.inClerkMode = inClerkMode;
}

short inGetIdleTimeOut(void)
{
	return srTCTRec.inIdleTimeOut;
}

void vdSetIdleTimeOut(short inIdleTimeOut)
{
	srTCTRec.inIdleTimeOut = inIdleTimeOut;
}

short inGetOpenTabDAmt(void)
{
	return srTCTRec.inOpenTabDAmt;
}

void vdSetOpenTabDAmt(short inOpenTabDAmt)
{
	srTCTRec.inOpenTabDAmt = inOpenTabDAmt;
}

short inGetZIDdownload(void)
{
	return srTCTRec.inZIDdownload;
}

void vdSetZIDdownload(short inZIDdownload)
{
	srTCTRec.inZIDdownload = inZIDdownload;
}

short inGetTipMaxAdjust(void)
{
	return srTCTRec.inTipMaxAdjust;
}

void vdSetTipMaxAdjust(short inTipMaxAdjust)
{
	srTCTRec.inTipMaxAdjust = inTipMaxAdjust;
}

short inGetPerOver(void)
{
	return srTCTRec.inPerOver;
}

void vdSetPerOver(short inPerOver)
{
	srTCTRec.inPerOver = inPerOver;
}

short inGetSurCharge(void)
{
	return srTCTRec.inSurCharge;
}

void vdSetSurCharge(short inSurCharge)
{
	srTCTRec.inSurCharge = inSurCharge;
}

short inGetAutoSettRetries(void)
{
	return srTCTRec.inAutoSettRetries;
}

void vdSetAutoSettRetries(short inAutoSettRetries)
{
	srTCTRec.inAutoSettRetries = inAutoSettRetries;
}

short inGetAutoSttlWaitTime(void)
{
	return srTCTRec.inAutoSttlWaitTime;
}

void vdSetAutoSttlWaitTime(short inAutoSttlWaitTime)
{
	srTCTRec.inAutoSttlWaitTime = inAutoSttlWaitTime;
}

short inGetApplicationType(void)
{
	return srTCTRec.inApplicationType;
}

void vdSetApplicationType(short inApplicationType)
{
	srTCTRec.inApplicationType = inApplicationType;
}

short inGetPINPadType(void)
{
	return srTCTRec.inPINPadType;
}

void vdSetPINPadType(short inPINPadType)
{
	srTCTRec.inPINPadType = inPINPadType;
}

short inGetEncryptMethod(void)
{
	return srTCTRec.inEncryptMethod;
}

void vdSetEncryptMethod(short inEncryptMethod)
{
	srTCTRec.inEncryptMethod = inEncryptMethod;
}

short inGetShiftType(void)
{
	return srTCTRec.inShiftType;
}

void vdSetShiftType(short inShiftType)
{
	srTCTRec.inShiftType = inShiftType;
}

short inGetDupCheck(void)
{
	return srTCTRec.inDupCheck;
}

void vdSetDupCheck(short inDupCheck)
{
	srTCTRec.inDupCheck = inDupCheck;
}

short inGetLanguageIdx(void)
{
	return srTCTRec.inLanguageIdx;
}

void vdSetLanguageIdx(short inLanguageIdx)
{
	srTCTRec.inLanguageIdx = inLanguageIdx;
}

short inGetNotifyTime(void)
{
	return srTCTRec.inNotifyTime;
}

void vdSetNotifyTime(short inNotifyTime)
{
	srTCTRec.inNotifyTime = inNotifyTime;
}

short inGetInvNumSize(void)
{
	return srTCTRec.inInvNumSize;
}

void vdSetInvNumSize(short inInvNumSize)
{
	srTCTRec.inInvNumSize = inInvNumSize;
}

short inGetEMVOnlineFlag(void)
{
	return srTCTRec.inEMVOnlineFlag;
}

void vdSetEMVOnlineFlag(short inEMVOnlineFlag)
{
	srTCTRec.inEMVOnlineFlag = inEMVOnlineFlag;
}

short inGetNumOfRings(void)
{
	return srTCTRec.inNumOfRings;
}

void vdSetNumOfRings(short inNumOfRings)
{
	srTCTRec.inNumOfRings = inNumOfRings;
}

short inGetECISupport(void)
{
	return srTCTRec.inECISupport;
}

void vdSetECISupport(short inECISupport)
{
	srTCTRec.inECISupport = inECISupport;
}

short inGetDockedModemType(void)
{
	return srTCTRec.inDockedModemType;
}

void vdSetDockedModemType(short inDockedModemType)
{
	srTCTRec.inDockedModemType = inDockedModemType;
}

short inGetExcessTab(void)
{
	return srTCTRec.inExcessTab;
}

void vdSetExcessTab(short inExcessTab)
{
	srTCTRec.inExcessTab = inExcessTab;
}

long lnGetTaxPercent(void)
{
	return srTCTRec.lnTaxPercent;
}

void vdSetTaxPercent(long lnTaxPercent)
{
	srTCTRec.lnTaxPercent = lnTaxPercent;
}

long lnGetReceiptLimitAmount(void)
{
	return srTCTRec.lnReceiptLimitAmount;
}

void vdSetReceiptLimitAmount(long lnReceiptLimitAmount)
{
	srTCTRec.lnReceiptLimitAmount = lnReceiptLimitAmount;
}

long lnGetSignLimitAmount(void)
{
	return srTCTRec.lnSignLimitAmount;
}

void vdSetSignLimitAmount(long lnSignLimitAmount)
{
	srTCTRec.lnSignLimitAmount = lnSignLimitAmount;
}

short inGetImamRestartMaxCount(void)
{
	return srTCTRec.inImamRestartMaxCount;
}

void vdSetImamRestartMaxCount(short inImamRestartMaxCount)
{
	srTCTRec.inImamRestartMaxCount = inImamRestartMaxCount;
}

VS_BOOL fGetPINBypass(void)
{
	return srTCTRec.fPINBypass;
}

void vdSetPINBypass(VS_BOOL fPINBypass)
{
	srTCTRec.fPINBypass = fPINBypass;
}

VS_BOOL fGetHHConfirmAmt(void)
{
	return srTCTRec.fHHConfirmAmt;
}

void vdSetHHConfirmAmt(VS_BOOL fHHConfirmAmt)
{
	srTCTRec.fHHConfirmAmt = fHHConfirmAmt;
}

VS_BOOL fGetTerminalBeep(void)
{
	return srTCTRec.fTerminalBeep;
}

void vdSetTerminalBeep(VS_BOOL fTerminalBeep)
{
	srTCTRec.fTerminalBeep = fTerminalBeep;
}

VS_BOOL fGetHourlyNotify(void)
{
	return srTCTRec.fHourlyNotify;
}

void vdSetHourlyNotify(VS_BOOL fHourlyNotify)
{
	srTCTRec.fHourlyNotify = fHourlyNotify;
}

VS_BOOL fGetAutoSettle(void)
{
	return srTCTRec.fAutoSettle;
}

void vdSetAutoSettle(VS_BOOL fAutoSettle)
{
	srTCTRec.fAutoSettle = fAutoSettle;
}

VS_BOOL fGetTaxProc(void)
{
	return srTCTRec.fTaxProc;
}

void vdSetTaxProc(VS_BOOL fTaxProc)
{
	srTCTRec.fTaxProc = fTaxProc;
}

VS_BOOL fGetOpenTabOptRec(void)
{
	return srTCTRec.fOpenTabOptRec;
}

void vdSetOpenTabOptRec(VS_BOOL fOpenTabOptRec)
{
	srTCTRec.fOpenTabOptRec = fOpenTabOptRec;
}

VS_BOOL fGetCloseTabOptRec(void)
{
	return srTCTRec.fCloseTabOptRec;
}

void vdSetCloseTabOptRec(VS_BOOL fCloseTabOptRec)
{
	srTCTRec.fCloseTabOptRec = fCloseTabOptRec;
}

VS_BOOL fGetTrainSettle(void)
{
	return srTCTRec.fTrainSettle;
}

void vdSetTrainSettle(VS_BOOL fTrainSettle)
{
	srTCTRec.fTrainSettle = fTrainSettle;
}

VS_BOOL fGetKeyboardLock(void)
{
	return srTCTRec.fKeyboardLock;
}

void vdSetKeyboardLock(VS_BOOL fKeyboardLock)
{
	srTCTRec.fKeyboardLock = fKeyboardLock;
}

VS_BOOL fGetSameCardConfirm(void)
{
	return srTCTRec.fSameCardConfirm;
}

void vdSetSameCardConfirm(VS_BOOL fSameCardConfirm)
{
	srTCTRec.fSameCardConfirm = fSameCardConfirm;
}

VS_BOOL fGetDemoMode(void)
{
	return srTCTRec.fDemoMode;
}

void vdSetDemoMode(VS_BOOL fDemoMode)
{
	srTCTRec.fDemoMode = fDemoMode;
}

VS_BOOL fGetManEntryPasswd(void)
{
	return srTCTRec.fManEntryPasswd;
}

void vdSetManEntryPasswd(VS_BOOL fManEntryPasswd)
{
	srTCTRec.fManEntryPasswd = fManEntryPasswd;
}

VS_BOOL fGetCashBack(void)
{
	return srTCTRec.fCashBack;
}

void vdSetCashBack(VS_BOOL fCashBack)
{
	srTCTRec.fCashBack = fCashBack;
}

VS_BOOL fGetMerchPWFlag(void)
{
	return srTCTRec.fMerchPWFlag;
}

void vdSetMerchPWFlag(VS_BOOL fMerchPWFlag)
{
	srTCTRec.fMerchPWFlag = fMerchPWFlag;
}

VS_BOOL fGetCounterPayTip(void)
{
	return srTCTRec.fCounterPayTip;
}

void vdSetCounterPayTip(VS_BOOL fCounterPayTip)
{
	srTCTRec.fCounterPayTip = fCounterPayTip;
}

VS_BOOL fGetOTabSettle(void)
{
	return srTCTRec.fOTabSettle;
}

void vdSetOTabSettle(VS_BOOL fOTabSettle)
{
	srTCTRec.fOTabSettle = fOTabSettle;
}

VS_BOOL fGetUnadjTip(void)
{
	return srTCTRec.fUnadjTip;
}

void vdSetUnadjTip(VS_BOOL fUnadjTip)
{
	srTCTRec.fUnadjTip = fUnadjTip;
}

VS_BOOL fGetKeyInvNum(void)
{
	return srTCTRec.fKeyInvNum;
}

void vdSetKeyInvNum(VS_BOOL fKeyInvNum)
{
	srTCTRec.fKeyInvNum = fKeyInvNum;
}

VS_BOOL fGetMultiMerchPrompt(void)
{
	return srTCTRec.fMultiMerchPrompt;
}

void vdSetMultiMerchPrompt(VS_BOOL fMultiMerchPrompt)
{
	srTCTRec.fMultiMerchPrompt = fMultiMerchPrompt;
}

VS_BOOL fGetDebitFlag(void)
{
	return srTCTRec.fDebitFlag;
}

void vdSetDebitFlag(VS_BOOL fDebitFlag)
{
	srTCTRec.fDebitFlag = fDebitFlag;
}

VS_BOOL fGetCashTipOn(void)
{
	return srTCTRec.fCashTipOn;
}

void vdSetCashTipOn(VS_BOOL fCashTipOn)
{
	srTCTRec.fCashTipOn = fCashTipOn;
}

VS_BOOL fGetMegaPassword(void)
{
	return srTCTRec.fMegaPassword;
}

void vdSetMegaPassword(VS_BOOL fMegaPassword)
{
	srTCTRec.fMegaPassword = fMegaPassword;
}

VS_BOOL fGetSugTipOn(void)
{
	return srTCTRec.fSugTipOn;
}

void vdSetSugTipOn(VS_BOOL fSugTipOn)
{
	srTCTRec.fSugTipOn = fSugTipOn;
}

VS_BOOL fGetUniqueIDPan(void)
{
	return srTCTRec.fUniqueIDPan;
}

void vdSetUniqueIDPan(VS_BOOL fUniqueIDPan)
{
	srTCTRec.fUniqueIDPan = fUniqueIDPan;
}

VS_BOOL fGetDualCurrency(void)
{
	return srTCTRec.fDualCurrency;
}

void vdSetDualCurrency(VS_BOOL fDualCurrency)
{
	srTCTRec.fDualCurrency = fDualCurrency;
}

VS_BOOL fGetAutoAnswer(void)
{
	return srTCTRec.fAutoAnswer;
}

void vdSetAutoAnswer(VS_BOOL fAutoAnswer)
{
	srTCTRec.fAutoAnswer = fAutoAnswer;
}

VS_BOOL fGetDebitPredial(void)
{
	return srTCTRec.fDebitPredial;
}

void vdSetDebitPredial(VS_BOOL fDebitPredial)
{
	srTCTRec.fDebitPredial = fDebitPredial;
}

VS_BOOL fGetPromptLanguage(void)
{
	return srTCTRec.fPromptLanguage;
}

void vdSetPromptLanguage(VS_BOOL fPromptLanguage)
{
	srTCTRec.fPromptLanguage = fPromptLanguage;
}

VS_BOOL fGetCustomerSwipe(void)
{
	return srTCTRec.fCustomerSwipe;
}

void vdSetCustomerSwipe(VS_BOOL fCustomerSwipe)
{
	srTCTRec.fCustomerSwipe = fCustomerSwipe;
}

VS_BOOL fGetImamForceSettle(void)
{
	return srTCTRec.fImamForceSettle;
}

void vdSetImamForceSettle(VS_BOOL fImamForceSettle)
{
	srTCTRec.fImamForceSettle = fImamForceSettle;
}

VS_BOOL fGetImamReferral(void)
{
	return srTCTRec.fImamReferral;
}

void vdSetImamReferral(VS_BOOL fImamReferral)
{
	srTCTRec.fImamReferral = fImamReferral;
}

VS_BOOL fGetImamAirlineTrx(void)
{
	return srTCTRec.fImamAirlineTrx;
}

void vdSetImamAirlineTrx(VS_BOOL fImamAirlineTrx)
{
	srTCTRec.fImamAirlineTrx = fImamAirlineTrx;
}

VS_BOOL fGetImamPrintPrompt(void)
{
	return srTCTRec.fImamPrintPrompt;
}

void vdSetImamPrintPrompt(VS_BOOL fImamPrintPrompt)
{
	srTCTRec.fImamPrintPrompt = fImamPrintPrompt;
}

VS_BOOL fGetImamSendVoided(void)
{
	return srTCTRec.fImamSendVoided;
}

void vdSetImamSendVoided(VS_BOOL fImamSendVoided)
{
	srTCTRec.fImamSendVoided = fImamSendVoided;
}

VS_BOOL fGetImamReportPerCard(void)
{
	return srTCTRec.fImamReportPerCard;
}

void vdSetImamReportPerCard(VS_BOOL fImamReportPerCard)
{
	srTCTRec.fImamReportPerCard = fImamReportPerCard;
}

